<!--COMMENTS-->
<a name="comments-box"></a>

<div class="gn_box">
    <div id="gn-widget-head-7" class="gn_box_head">
        <div class="gn_box_head_bigtitle" style="font-size:16px;color:#000;padding-top:6px;">Сэтгэгдэл</div>
    </div>

    <div id="comments">
      <?php 
        $comments = Doctrine::getTable('Comment')->findByObject($objectType, $objectId);
        foreach ($comments as $comment)
        {
          include_partial('comment/list', array('comment'=>$comment));
        }
      ?>
    </div>
    
    <br clear="all">

    <?php include_partial('comment/form', array('objectType'=>$objectType, 'objectId'=>$objectId)) ?>    
    
</div><!--comments-->

<br clear="all">
<br clear="all">



<script type="text/javascript">
function deleteComment(id)
{
  $.ajax({
    url: "<?php echo url_for('comment/delete')?>", 
    data: {commentId : id},
    success: function(data){
      var commentDiv = '#comment'+id;
      $(commentDiv).hide();
    }
  });
}
</script>